import request from '@/utils/request'

// 查询诚意金管理列表
export function listEarnestmoney(buyid) {
  return request({
    url: '/house_sale/earnestmoney/list1/'+buyid,
    method: 'get',
  })
}
//转签约
export function toContract(form1){
  return request({
    url: '/house_sale/earnestmoney/contract',
    method: 'put',
    data: form1
  })
}
//作废
export function beInvalid(form2){
  return request({
    url: '/house_sale/earnestmoney/invalid',
    method: 'put',
    data: form2
  })
}
//获取付款方式
export function getPaidType(){
  return request({
    url: '/house_sale/earnestmoney/paidtypeList',
    method: 'get',
  })
}
//废弃的列表
export function listEarnestmoney1(query) {
  return request({
    url: '/house_sale/earnestmoney/list',
    method: 'get',
    params: query
  })
}
// 查询诚意金管理详细
export function getEarnestmoney(earnestid) {
  return request({
    url: '/house_sale/earnestmoney/' + earnestid,
    method: 'get'
  })
}

// 新增诚意金管理
export function addEarnestmoney(data) {
  return request({
    url: '/house_sale/earnestmoney',
    method: 'post',
    data: data
  })
}
// 新增收款管理
export function addFinance(data) {
  return request({
    url: '/house_sale/earnestmoney/finance',
    method: 'post',
    data: data
  })
}
// 修改诚意金管理
export function updateEarnestmoney(data) {
  return request({
    url: '/house_sale/earnestmoney',
    method: 'put',
    data: data
  })
}

// 删除诚意金管理
export function delEarnestmoney(earnestid) {
  return request({
    url: '/house_sale/earnestmoney/' + earnestid,
    method: 'delete'
  })
}

